﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="clr-namespace:BillsManager.Views.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Values.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="CrossButtonStyle" TargetType="{x:Type Button}">

        <Setter Property="Focusable" Value="False" />

        <Setter Property="Height" Value="20" />
        <Setter Property="Width" Value="20" />

        <Setter Property="Padding" Value="4" />

        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />

        <Setter Property="Background" Value="{StaticResource ControlBox.Buttons.Close.Background.Normal}" />
        <Setter Property="BorderBrush" Value="{StaticResource ControlBox.Buttons.Close.BorderBrush.Normal}" />
        <Setter Property="Foreground" Value="{StaticResource ControlBox.Buttons.Close.Foreground.Normal}" />

        <Setter Property="BorderThickness" Value="{StaticResource ControlBox.Buttons.BorderThickness}" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">

                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                        <Path HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Data="{StaticResource CloseGeometry}"
                              Fill="{TemplateBinding Foreground}"
                              Stretch="Uniform" />
                    </Border>

                    <ControlTemplate.Triggers>

                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Foreground" Value="{StaticResource ControlBox.Buttons.Close.Background.Hover}" />
                            <Setter Property="Foreground" Value="{StaticResource ControlBox.Buttons.Close.BorderBrush.Hover}" />
                            <Setter Property="Foreground" Value="{StaticResource ControlBox.Buttons.Close.Foreground.Hover}" />
                        </Trigger>

                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Foreground" Value="{StaticResource ControlBox.Buttons.Close.Background.Pressed}" />
                            <Setter Property="Foreground" Value="{StaticResource ControlBox.Buttons.Close.BorderBrush.Pressed}" />
                            <Setter Property="Foreground" Value="{StaticResource ControlBox.Buttons.Close.Foreground.Pressed}" />
                        </Trigger>

                        <!--<Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{StaticResource ControlBox.Buttons.Close.Background.Pressed}" />
                            <Setter Property="Foreground" Value="{StaticResource ControlBox.Close.BorderBrush.Pressed}" />
                            <Setter Property="Foreground" Value="{StaticResource ControlBox.Close.Foreground.Pressed}" />
                        </Trigger>-->

                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>